package com.example.myannotation

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.Button
import com.example.annotation.MyClass
import com.example.reflect.InjectUtil
import com.example.reflect.LogUtil
import com.example.reflect.OnClick
import com.example.reflect.OnLongClick

@MyClass
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        InjectUtil.bind(this)
        LogUtil.init(this)
//        findViewById<Button>(R.id.btn1).setOnClickListener()

    }

    @OnClick(R.id.btn1, R.id.btn2, R.id.btn3)
    @com.example.reflect.Log(USG_LOG_level = "e", MSG = "凄凄切切凄凄切切凄凄切切凄凄切切凄凄切切凄凄切切凄凄切切凄凄切切去")
    fun click(view: View) {
        when (view.id) {

            R.id.btn1 ->
                Log.i("MainActivity", "One")
            R.id.btn2 ->
                Log.i("MainActivity", "Two")

            R.id.btn3 ->
                Log.i("MainActivity", "Three")

        }
    }

}